home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10759 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  33 lines

  1. Path: access1.digex.net!not-for-mail
  2. From: ell@access1.digex.net (Ell)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: How can I include IOSTREAM.H only once?
  5. Date: 10 Mar 1996 02:52:58 GMT
  6. Organization: The Universe
  7. Message-ID: <4htg6a$593@news4.digex.net>
  8. References: <4hbi55$899@sam.inforamp.net> <4hc09v$136@news1.usa.pipeline.com> <4hj42l$elu@sam.inforamp.net> <4hqck8$fvc@uuneo.neosoft.com> <4hsgid$pmm@sam.inforamp.net>
  9. NNTP-Posting-Host: access1.digex.net
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Randy Charles Morin (rmorin@inforamp.net) wrote:
  13. : In article <4hqck8$fvc@uuneo.neosoft.com>,
  14. :    Wmatthew@lan-aces.com (W. Matthews) wrote:
  15. : >I haven't seen the entire string relating to this, but some compilers have
  16. : >a useful #define statement in the include files.
  17. : >The way to take advantage of this is to do something along the following
  18. : >lines in each source module that may include a particular header.  However,
  19. : >this does not work in every situation: (I use stdio.h as an example)
  20. : >#ifndef __STDIO__
  21. : >#include <stdio.h>
  22. : >#endif
  23.  
  24. And generally the '#endif' is the last of code in the file.
  25.  
  26. #ifndef __STDIO__
  27. #include <stdio.h>
  28.  /*...code...*/
  29.  /*...code...*/
  30. #endif
  31.  
  32. Elliott
  33.